﻿<Window x:Class="WF4Host.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toolbox="clr-namespace:System.Activities.Presentation.Toolbox;assembly=System.Activities.Presentation"
        xmlns:host="clr-namespace:WF4Host"
        xmlns:custom="clr-namespace:MyActivities;assembly=MyActivities"
        xmlns:wf="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
        xmlns:wfview="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
        xmlns:activities="clr-namespace:System.Activities.Statements;assembly=System.Activities"
        Title="MainWindow" Height="650" Width="825"
        Icon="Assets/App.ico"
        TextOptions.TextFormattingMode="Display"
       
        >
    <Window.Resources>
        <host:HostingHelper x:Key="wfHost"/>
        <host:ToolboxItemSource x:Key="GeneralTools">
            <host:ToolboxSource TargetCategory="General" AllSiblingsOf="{x:Type activities:Delay}"  />
            <host:ToolboxSource TargetCategory="Custom" AllSiblingsOf="{x:Type custom:CustomSampleActivity}"  />
        </host:ToolboxItemSource>
        <LinearGradientBrush x:Key="backBrush" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#293955"/>
            <GradientStop Color="#35496a" Offset="0.5"/>
            <GradientStop Color="#35496a" Offset="0.5"/>
            <GradientStop Color="#293955" Offset="1"/>
        </LinearGradientBrush>
        
        <Style TargetType="GridSplitter">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="true">
                    <Setter Property="Background" Value="Black"/>
                </Trigger>

            </Style.Triggers>
        </Style>
        <Style TargetType="Button" x:Key="toolButton">
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="4,4,4,4"/>
        </Style>
    </Window.Resources>
    <Window.DataContext>
        <StaticResourceExtension ResourceKey="wfHost"/>
    </Window.DataContext>
    <Border Padding="8,0,8,8" Background="{StaticResource backBrush}">
    <Grid Name="grid">
            <Grid.RowDefinitions>
                <RowDefinition Height="32"/>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="4"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"></ColumnDefinition>
                <ColumnDefinition Width="4"></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            
        </Grid.ColumnDefinitions>

            <StackPanel Orientation="Horizontal" Grid.ColumnSpan="4" Grid.Row="0" Background="Transparent">

                <Button Style="{StaticResource toolButton}" ToolTip="Copy"   Command="wfview:DesignerView.CopyCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/page_copy.png"></Image>
                </Button>
                <Button Style="{StaticResource toolButton}" ToolTip="Cut"   Command="wfview:DesignerView.CutCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/cut_red.png"></Image>
                </Button>
                <Button Style="{StaticResource toolButton}" ToolTip="Paste"   Command="wfview:DesignerView.PasteCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/page_paste.png"></Image>
                </Button>


                <Button Style="{StaticResource toolButton}" ToolTip="Zoom In"   Command="wfview:DesignerView.ZoomInCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/zoom_in.png"></Image>
                </Button>
                <Button Style="{StaticResource toolButton}" ToolTip="Zoom Out"   Command="wfview:DesignerView.ZoomOutCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/zoom_out.png"></Image>
                </Button>
                <Button Style="{StaticResource toolButton}" ToolTip="Undo"   Command="wfview:DesignerView.UndoCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/arrow_undo.png"></Image>
                </Button>
                <Button Style="{StaticResource toolButton}" ToolTip="Redo"   Command="wfview:DesignerView.RedoCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/arrow_redo.png"></Image>
                </Button>
                <Button Style="{StaticResource toolButton}" ToolTip="Copy as image"   Command="wfview:DesignerView.CopyAsImageCommand" host:HostingHelper.DesignerCommandTarget="{StaticResource wfHost}" >
                    <Image Source="Assets/images.png"></Image>
                </Button>
            </StackPanel>
            
            <toolbox:ToolboxControl Grid.Column="0" Grid.Row="1" host:ToolboxItemSource.CategorySource="{StaticResource GeneralTools}"/>
            <GridSplitter  ResizeDirection="Columns" Grid.RowSpan="3" Grid.Column="1" Grid.Row="1" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
            <host:MainViewPresenter HostingHelper="{StaticResource wfHost}" Grid.RowSpan="3" Grid.Column="2" Grid.Row="1"/>
            <GridSplitter ResizeDirection="Rows" Grid.Column="0" Grid.Row="2" Height="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
            <host:PropertyViewPresenter HostingHelper="{StaticResource wfHost}" Grid.Column="0" Grid.Row="3"/>
        </Grid>
    </Border>
</Window>
